package com.example.springbootdemo.service;

import com.example.springbootdemo.entity.User;
import com.example.springbootdemo.exception.BizException;
import com.example.springbootdemo.model.TableData;

public interface IUserService {

    /**
     * 因为我们要做统一的业务异常处理, 需要将业务上的异常抛出来, 然后在Controller中做统一的异常处理,
     * 要让前端知道.
     * @param offset
     * @param limit
     * @return
     * @throws BizException
     */
    TableData<User> getPageData(Integer offset, Integer limit) throws BizException;

    User getUser(Integer id) throws BizException;
}
